package com.appcenter.application.mapper;

import com.appcenter.application.dto.orgs.OrgDto;
import com.appcenter.application.input.permissiongroup.GetPermissionGroupsInput;
import com.appcenter.application.model.PermissionGroups;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

@org.apache.ibatis.annotations.Mapper
@Repository
public interface PermissionGroupsMapper extends Mapper<PermissionGroups> {

    @Select("select permissiongroups.* from  permissiongroups join  apps on  apps.Id=permissiongroups.AppId  " +
            "where apps.ValidStatus=1 and permissiongroups.ValidStatus=1 and  apps.AppCode= #{appCode} ")
    public List<PermissionGroups> GetPermissionGroups(GetPermissionGroupsInput input);
}
